package com.example.demo.service.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.fastjson.JSONObject;
import com.example.demo.prop.ProjectDubboProp;
import com.example.demo.service.TestService;
import com.sunnsoft.dubbo.BasicsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TestServiceImpl implements TestService {

    @Reference
    BasicsService basicsService;
    @Autowired
    private ProjectDubboProp projectDubboProp;

    @Override
    public JSONObject testDubbo(Long merchantId) {
        return basicsService.FindModuleByArea(projectDubboProp.getSecretKey(), String.valueOf(merchantId));
    }
}